<!-- include tpl=head_open -->
<script type="text/javascript">
function save()
{
	if(typeof(CKEDITOR) != "undefined"){
		for(var i in CKEDITOR.instances){
			CKEDITOR.instances[i].updateElement();
		}
	}
	var opener = $.dialog.opener;
	$("#post_save").ajaxSubmit({
		'url':get_url('all','tpl_setting_save'),
		'type':'post',
		'dataType':'json',
		'success':function(rs){
			if(rs.status){
				$.dialog.alert('操作成功',function(){
					opener.$.dialog.close();
				},'succeed');
				return true;
			}
			$.dialog.alert(rs.info);
			return false;
		}
	});
}
</script>
<div class="list">
<form method="post" id="post_save" onsubmit="return false">
<table width="100%" class="list" cellpadding="0" cellspacing="0">
<tr>
	<th style="text-align:right">名称</th>
	<th>默认模板</th>
	<th style="text-align:left;">自定义模板</th>
</tr>
<!-- loop from=$tpls key=$key value=$value id=$tmpid -->
<tr>
	<td align="right"><!-- if $value.title -->{$value.title}<!-- else -->{$value.default}<!-- /if --></td>
	<td class="center">{$value.default}<!-- if $tplext -->.{$tplext}<!-- /if --></td>
	<td>
		<select name="{$key}">
			<option value="">{lang使用默认模板…}</option>
			<!-- loop from=$filelist key=$k value=$v id=$idx -->
			<option value="{$v.id}"{if $value.tpl && $v.id == $value.tpl} selected{/if}>{$v.title}</option>
			<!-- /loop -->
		</select>
	</td>
</tr>
<!-- /loop -->
</table>
</form>
</div>

<!-- include tpl=foot_open -->